
#pragma once

#define ERROR_BASE				100

#define ERROR_GENERAL			01	// TWAIN general error

#define ERROR_DSM_LOAD_FAILED	10	// DSM could not be loaded, ensure that it is installed
#define ERROR_DSM_OPEN_FAILED	11	// DG_CONTROL / DAT_PARENT / MSG_OPENDSM - open DSM failed
#define ERROR_DSM_CLOSE_FAILED	12	// DG_CONTROL / DAT_PARENT / MSG_OPENDSM - close DSM failed
#define ERROR_DSM_NOT_OPEN		13	// the DSM has not been opened, open it first
#define ERROR_DSM_ENTRY			14	// DG_CONTROL / DAT_ENTRYPOINT / MSG_GET - failed getting entry points
#define ERROR_DSM_NOT_CLOSED	15	// the DSM is still open, close it first

#define ERROR_DS_GET_INFO			20	// failed to get the data source info
#define ERROR_DS_SELECT_CANCEL		21	// canceled data source selection
#define ERROR_DS_SELECT_FAILED		21	// failed to select the data source
#define ERROR_DS_OPEN				22	// failed to open data source
#define ERROR_DS_CLOSE				23	// failed to close data source
#define ERROR_CAP_GET				24	// failed to get the capability
